<?php
//数组知识练习
$student=array(
    'name' =>'大狮子' ,
    'No.'=>'P161713123',
    'url'=>'https://gitee.com/ButLeo/first-php.git',
     );

$array[1,2,3,4,5];
//函数练习
function p($var=''){
    echo "<pre>";
    var_dump($var);
    echo "</pre>";
}

p($student);
p($student['name']);
p($array);
p($array[4]);

//比较运算符
$a=true;
$b='true';

p($a==$b);
p($a===$b);


//错误抑制符

//stack overflow
@p($c);

//执行shell命令
$output = 'ls';
p($output);

//字符串拼接
$str1='西北民族';
$str2='大学';

echo $str1.$str2;

//流程控制
$total =100000;
if ($total==300000) {
    echo '买车了';
}else{
    echo '加油';
}

while ( $total>= 10000000) {
    $total=$total-1000;
    p($total);
}





























>